#-*- coding:UTF-8 -*-
import sys,os

def find_all_files(path):
    files=os.listdir(path.decode("utf-8"))
    fileslist = []
    for ff in files:
        ffpath=path+"\\"+ff
        print ffpath
        if os.path.isfile(ffpath):
            fileslist.append(ffpath)
            print "It is a file  "+ffpath
        elif os.path.isdir(ffpath):
            fileslist+=find_all_files(ffpath)
            print "It is a dir  "+ffpath
        else:
            print 'parse error!', '\t', ffpath
    return fileslist

for path in find_all_files("G:\Game"):
    file=open(path,"r")
    print "文件名：",file.name
    for line in file:
        print line.split("\\|")


